Repository navigation
tools: drive_test's Windows record race - #38
Merged
Merged
Conversation
…d-in retries its record's replace and the test retries its read on PermissionError, which failed the MSVC 14.5 job at random
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The final CI's MSVC 14.5 job failed in tools/drive/drive_test.py (
test_a_killed_or_stopped_run_leaves_nothing):PermissionError: [Errno 13] Permission denied: ...terminated.json. It passed on the run before it, so it is a race, not a defect of the change under test.Cause: the stand-in driver writes its record twice and replaces it with
os.replace; on Windows a file that another process has open cannot be replaced or opened during the replace, so the test's read and the stand-in's replace can collide.Fix: the stand-in retries its replace on PermissionError (up to 5 s), and the test's
recorded()retries a read that hits PermissionError within its existing deadline. POSIX behaviour is unchanged; drive_test passes on macOS.🤖 Generated with Claude Code